package com.nettcp;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;





public class TCPFileUploadClient {

	public static void main(String[] args) throws IOException {



		Socket socket=new Socket("192.168.31.194",1314);
		
		OutputStream out =  socket.getOutputStream();
		FileInputStream in= new FileInputStream("222.jpg");
		byte[] buffer = new byte[1024];
		
		int len = 0;
		while((len = in.read(buffer))!= -1){
			out.write(buffer,0,len);
		}
		
		in.close();
		out.close();	
	}
}	
	
	









		

